Repository navigation
feat(ci): publish linux/amd64 and linux/arm64 images - #137
Merged
Merged
Conversation
The published images were linux/amd64 only. Both images now publish one manifest list per tag for linux/amd64 and linux/arm64, on all channels. - Backend: native-image cannot cross-compile, so each binary is compiled on a runner of its own architecture and pushed by digest. One last job joins the digests into the manifest list and writes the tags, so a tag moves only when both architectures are built. - Dockerfile.native-ci selects the ELF loader from the target architecture and fails the build for other architectures. - Frontend: one multi-platform build. The build stage runs on the build platform and the runtime stage has no RUN step, so no emulation is used. - PR checks run the native integration tests on arm64 also, on the same pinned runner images that publishing uses. - The publish workflow verifies the platforms of each tag it writes. Refs #132
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #132
Summary
Both images publish
linux/amd64+linux/arm64as one manifest list per tag, on all channels.native-imagecannot cross-compile, so each backend binary is compiled on a runner of its own architecture (new ADR 0043,docs/adr/0043-images-are-multi-arch-built-natively-per-architecture.md).Dockerfile.native-ciselects the ELF loader from the target architecture:A backend tag moves only when both architectures are built. The publish workflow checks the platforms of each tag after it writes the tag.
Evidence
bash ci/test-native-dockerfile-arch.shagainst the old Dockerfilebash ci/check-image-platforms.sh linux/amd64,linux/arm64 ghcr.io/sreyardship/platformup2date/backend:edgefrontend/ci/bin/test-build-version-image.shpasses with the changedfrontend/Dockerfile.docker build --platform linux/arm64 frontendcompletes on an amd64 host without emulation and gives alinux/arm64image./lib/ld-linux-aarch64.so.1and/usr/lib64/libz.so.1exist in the arm64 UBI9 images that the Dockerfile uses.actionlintandshellcheckpass.Not verified
native (arm64)check on this PR is the first run.mainand on tags. The digest hand-over between the jobs anddocker buildx imagetools createare checked by reading and byactionlintonly.Post-merge check, after the edge run on
main:The publish workflow runs the same check on each tag it writes.
Merge Danger
Door: two-way
A revert restores amd64-only publishing. It becomes a commitment after the first release that arm64 users pull.
Blast Radius: publishing
main, no backend tag moves and:edgestays on the last good image. The frontend job is independent and can still move its tags, as before.v1.0.0before one edge run publishes both architectures.nativeis replaced bynative (amd64)andnative (arm64).mainhas no branch protection now. If required checks are added, use the new names.ubuntu-24.04/ubuntu-24.04-arminstead ofubuntu-latest, so both architectures compile against the same glibc.